import { BorderBox1 } from "./datav/border-box1/src/border-box1";
import { BorderBox2 } from "./datav/border-box2/src/border-box2";
import { BorderBox3 } from "./datav/border-box3/src/border-box3";
import { BorderBox4 } from "./datav/border-box4/src/border-box4";
import { BorderBox5 } from "./datav/border-box5/src/border-box5";
import { BorderBox6 } from "./datav/border-box6/src/border-box6";
import { BorderBox7 } from "./datav/border-box7/src/border-box7";
import { BorderBox8 } from "./datav/border-box8/src/border-box8";
import { BorderBox9 } from "./datav/border-box9/src/border-box9";
import { BorderBox10 } from "./datav/border-box10/src/border-box10";
import { BorderBox11 } from "./datav/border-box11/src/border-box11";
import { BorderBox12 } from "./datav/border-box12/src/border-box12";
import { BorderBox13 } from "./datav/border-box13/src/border-box13";
import { baseUrl } from "./../utils/constant";

export function createComponent(name) {
  switch (name) {
    case "DvBorderBox1":
      const borderBox1 = new BorderBox1();
      borderBox1.alias = "DvBorderBox1";
      borderBox1.img = `${baseUrl}lib-png/border-box-1.png`;
      return borderBox1;

    case "DvBorderBox2":
      const borderBox2 = new BorderBox2();
      borderBox2.alias = "DvBorderBox2";
      borderBox2.img = `${baseUrl}lib-png/border-box-2.png`;
      return borderBox2;

    case "DvBorderBox3":
      const borderBox3 = new BorderBox3();
      borderBox3.alias = "DvBorderBox3";
      borderBox3.img = `${baseUrl}lib-png/border-box-3.png`;
      return borderBox3;

    case "DvBorderBox4":
      const borderBox4 = new BorderBox4();
      borderBox4.alias = "DvBorderBox4";
      borderBox4.img = `${baseUrl}lib-png/border-box-4.png`;
      return borderBox4;

    case "DvBorderBox5":
      const borderBox5 = new BorderBox5();
      borderBox5.alias = "DvBorderBox5";
      borderBox5.img = `${baseUrl}lib-png/border-box-5.png`;
      return borderBox5;

    case "DvBorderBox6":
      const borderBox6 = new BorderBox6();
      borderBox6.alias = "DvBorderBox6";
      borderBox6.img = `${baseUrl}lib-png/border-box-6.png`;
      return borderBox6;

    case "DvBorderBox7":
      const borderBox7 = new BorderBox7();
      borderBox7.alias = "DvBorderBox7";
      borderBox7.img = `${baseUrl}lib-png/border-box-7.png`;
      return borderBox7;

    case "DvBorderBox8":
      const borderBox8 = new BorderBox8();
      borderBox8.alias = "DvBorderBox8";
      borderBox8.img = `${baseUrl}lib-png/border-box-8.png`;
      return borderBox8;

    case "DvBorderBox9":
      const borderBox9 = new BorderBox9();
      borderBox9.alias = "DvBorderBox9";
      borderBox9.img = `${baseUrl}lib-png/border-box-9.png`;
      return borderBox9;

    case "DvBorderBox10":
      const borderBox10 = new BorderBox10();
      borderBox10.alias = "DvBorderBox10";
      borderBox10.img = `${baseUrl}lib-png/border-box-10.png`;
      return borderBox10;

    case "DvBorderBox11":
      const borderBox11 = new BorderBox11();
      borderBox11.alias = "DvBorderBox11";
      borderBox11.img = `${baseUrl}lib-png/border-box-11.png`;
      return borderBox11;

    case "DvBorderBox12":
      const borderBox12 = new BorderBox12();
      borderBox12.alias = "DvBorderBox12";
      borderBox12.img = `${baseUrl}lib-png/border-box-12.png`;
      return borderBox12;

    case "DvBorderBox13":
      const borderBox13 = new BorderBox13();
      borderBox13.alias = "DvBorderBox13";
      borderBox13.img = `${baseUrl}lib-png/border-box-13.png`;
      return borderBox13;
    default:
      throw Error(`Unknown component type: ${name}.`);
  }
}
